<?php

namespace App\Model\Table;

use Cake\ORM\Table;
use Cake\Validation\Validator;
use Cake\ORM\Query;
use Cake\Utility\Inflector;
use Cake\Filesystem\Folder;
use Cake\Filesystem\File;

class EmissorasCountTable extends Table {

    public function initialize(array $config) {
        $this->table('abert_emissora_count');
    }

    public function findCount() {
        $count = $this->find('all')->first();
        $count['count'] = $count['count'] + 1;
        $this->save($count);

        return $count['count'] - 1;
    }

}
